package com.tang.logger.pusher;

import com.tang.logger.domain.LogMessage;

import java.util.concurrent.LinkedBlockingQueue;

/**
 * @author Tang
 * @classname LogMessageBuffer
 * @description [  ]
 * @date 2021/7/25 22:24
 */
public class LogMessageBuffer {

    private static final LinkedBlockingQueue<LogMessage> LOG_MSG = new LinkedBlockingQueue<>(100);

    public static void push(LogMessage logMessage) {
        LOG_MSG.add(logMessage);
    }

    public static LogMessage take() throws InterruptedException {
        return LOG_MSG.take();
    }

}